//
//  BMPhotoIOVideoModel.h
//  bigmama
//
//  Created by huyuchen on 2017/9/28.
//  Copyright © 2017年 盛成文化. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <Photos/Photos.h>
#import <AssetsLibrary/AssetsLibrary.h>

typedef NS_ENUM(NSInteger,BMPhotoIOVideoType){
    BMPhotoIOVideoTypeCamera,   // 相机
    BMPhotoIOVideoTypePhoto,    // 照片
};

@interface BMPhotoIOVideoModel : NSObject
// 创建日期
@property (nonatomic, strong) NSDate *createDate;

// 创建日期字符创
@property (nonatomic, copy) NSString *createDateString;

// 原图
@property (nonatomic, strong) UIImage *originalImage;

// 缩略图
@property (nonatomic, strong) UIImage *thumbImage;

// 缩略图
@property (nonatomic, strong) UIImage *cacheImage;

// 照片对象
@property (nonatomic, strong) PHAsset *asset;

// 照片对象IOS7
@property (nonatomic, strong) ALAsset *assetIOS7;

// 索引
@property (nonatomic, copy) NSString *assetID;

// 是否选中
@property (nonatomic, assign, getter=isSelected) BOOL selected;

// 所在indexPath
@property (nonatomic, weak) NSIndexPath *indexPath;

// 当前类型
@property (nonatomic, assign) BMPhotoIOVideoType type;

// 位置
@property (nonatomic, strong) CLLocation *location;

// 时长
@property (nonatomic, assign) NSTimeInterval duration;

@property (nonatomic, copy) NSString *durationStr;

@property (nonatomic,strong) AVAsset *videoAsset;

// 沙盒url
@property (nonatomic, copy) NSString *cacheVideoName;

@property (nonatomic, assign) NSTimeInterval startSecond;  ///< leftDragView对应的秒

@property (nonatomic,assign) NSTimeInterval endSecond;///< rightDragView对应的秒

@property (nonatomic,assign) NSTimeInterval cutDuration;//当前的裁剪长度

@property (nonatomic,strong) NSData *videoData;//视频的data

// 是否上传过
@property (nonatomic, assign) BOOL isUploaded;

// 图片是否上传过
@property (nonatomic, assign, getter=videoIsUploaded) BOOL videoUploaded;

// 视频缩略图url
@property (nonatomic, copy) NSString *thumbUrl;

+ (id)camerModel;


@end
